import zj from "@/assets/mapJson/zhejiang.json";
import hangzhou from "@/assets/mapJson/hangzhou.json";
import huzhou from "@/assets/mapJson/huzhou.json";
import jiaxing from "@/assets/mapJson/jiaxing.json";
import jinhua from "@/assets/mapJson/jinhua.json";
import lishui from "@/assets/mapJson/lishui.json";
import ningbo from "@/assets/mapJson/ningbo.json";
import quzhou from "@/assets/mapJson/quzhou.json";
import taizhou from "@/assets/mapJson/taizhou.json";
import wenzhou from "@/assets/mapJson/wenzhou.json";
import zhoushan from "@/assets/mapJson/zhoushan.json";
import shaoxing from "@/assets/mapJson/shaoxing.json";

const cityNameMaptoJson = [
  { label: '浙江省', mapJson: zj },
  { label: '杭州市', mapJson:hangzhou },
  { label: '湖州市', mapJson:huzhou },
  { label: '嘉兴市', mapJson:jiaxing },
  { label: '金华市', mapJson:jinhua },
  { label: '丽水市', mapJson:lishui },
  { label: '宁波市', mapJson:ningbo },
  { label: '衢州市', mapJson:quzhou },
  { label: '台州市', mapJson:taizhou },
  { label: '温州市', mapJson:wenzhou },
  { label: '舟山市', mapJson:zhoushan },
  { label: '绍兴市', mapJson:shaoxing }
]

export default cityNameMaptoJson

const areaPos = [
  { name: "湖州市", lnglat: "119.450535,30.704551" },
  { name: "嘉兴市", lnglat: "120.355806,30.576855" },
  { name: "杭州市", lnglat: "119.047526,29.855926" },
  { name: "绍兴市", lnglat: "120.19963,29.687116" },
  { name: "舟山市", lnglat: "121.733752,30.01476" },
  { name: "宁波市", lnglat: "121.068599,29.682733" },
  { name: "金华市", lnglat: "119.497405,29.057354" },
  { name: "台州市", lnglat: "120.681724,28.690794" },
  { name: "丽水市", lnglat: "119.047741,28.158297" },
  { name: "温州市", lnglat: "120.032596,27.856389" },
  { name: "衢州市", lnglat: "118.231169,28.893019" },
  { name: "上城区", lnglat: "120.238785,30.297184" },
  { name: "临平区", lnglat: "120.313446,30.483106" },
  { name: "钱塘区", lnglat: "120.536038,30.353732" },
  { name: "拱墅区", lnglat: "120.150556,30.324706" },
  { name: "西湖区", lnglat: "120.13, 30.27" },
  { name: "萧山区", lnglat: "120.295887,30.109808" },
  { name: "临安区", lnglat: "119.58845,30.319647" },
  { name: "富阳区", lnglat: "119.95, 30.05" },
  { name: "淳安县", lnglat: "119.03, 29.6" },
  { name: "建德市", lnglat: "119.508673,29.548393" },
  { name: "桐庐县", lnglat: "119.582618,29.908908" },
  { name: "余杭区", lnglat: "120.011181,30.410488" },
  { name: "滨江区", lnglat: "120.202129,30.184618" },
  { name: "余姚市", lnglat: "121.19, 30.03" },
  { name: "慈溪市", lnglat: "121.313419,30.261639" },
  { name: "江北区", lnglat: "121.560358,29.9747" },
  { name: "北仑区", lnglat: "121.85, 29.93" },
  { name: "鄞州区", lnglat: "121.628653,29.818567" },
  { name: "海曙区", lnglat: "121.433217,29.839659" },
  { name: "镇海区", lnglat: "121.638589,30.033749" },
  { name: "奉化区", lnglat: "121.4, 29.65" },
  { name: "象山县", lnglat: "121.87, 29.48" },
  { name: "宁海县", lnglat: "121.43, 29.28" },
  
  { name: "鹿城区", lnglat: "120.664565,28.021338" },
  { name: "瓯海区", lnglat: "120.634543,27.910701" },
  { name: "龙湾区", lnglat: "120.884366,27.885256" },
  { name: "洞头区", lnglat: "121.15, 27.89" },
  { name: "永嘉县", lnglat: "120.68, 28.25" },
  { name: "平阳县", lnglat: "120.57, 27.67" },
  { name: "苍南县", lnglat: "120.4, 27.5" },
  { name: "文成县", lnglat: "120.08, 27.82" },
  { name: "泰顺县", lnglat: "119.99, 27.57" },
  { name: "瑞安市", lnglat: "120.58, 27.83" },
  { name: "乐清市", lnglat: "120.95, 28.13" },
  { name: "秀洲区", lnglat: "120.762003,30.867961" },
  { name: "嘉善县", lnglat: "121.0084,30.992281" },
  { name: "海盐县", lnglat: "120.95, 30.533" },
  { name: "海宁市", lnglat: "120.68, 30.53" },
  { name: "平湖市", lnglat: "121.02, 30.7" },
  { name: "桐乡市", lnglat: "120.57, 30.63" },
  { name: "吴兴区", lnglat: "120.188157,30.86494" },
  { name: "南浔区", lnglat: "120.438532,30.854028" },
  { name: "德清县", lnglat: "119.981744,30.549126" },
  { name: "长兴县", lnglat: "119.920946,31.033075" },
  { name: "安吉县", lnglat: "119.688286,30.638955" },

  { name: "柯桥区", lnglat: "120.459984,30.111299" },
  { name: "越城区", lnglat: "120.649583,29.998813" },
  { name: "新昌县", lnglat: "120.9, 29.5"},
  { name: "诸暨市", lnglat: "120.23, 29.72" },
  { name: "上虞区", lnglat: "120.87, 30.03" },
  { name: "嵊州市", lnglat: "120.82, 29.58" },

  { name: "婺城区", lnglat: "119.65, 29.08" },
  { name: "金东区", lnglat: "119.813301,29.138507" },
  { name: "武义县", lnglat: "119.82, 28.9" },
  { name: "浦江县", lnglat: "119.88, 29.45" },
  { name: "磐安县", lnglat: "120.53758,29.015641" },
  { name: "兰溪市", lnglat: "119.45, 29.22" },
  { name: "义乌市", lnglat: "120.07, 29.3" },
  { name: "永康市", lnglat: "120.09, 28.94" },
  { name: "东阳市", lnglat: "120.329243,29.286444" },
  // 左右（越大越往右） 上下（越大越往上）
  { name: "柯城区", lnglat: "118.921852,29.038392" },
  { name: "衢江区", lnglat: "119.019003,28.824849" },
  { name: "常山县", lnglat: "118.52, 28.9" },
  { name: "开化县", lnglat: "118.42, 29.13" },
  { name: "龙游县", lnglat: "119.238208,29.006693" },
  { name: "江山市", lnglat: "118.62, 28.75" },
  { name: "定海区", lnglat: "122.1, 30.12" },
  { name: "普陀区", lnglat: "122.37466,29.937284" },
  { name: "岱山县", lnglat: "122.241556,30.197227" },
  { name: "嵊泗县", lnglat: "122.468514,30.713889" },

  { name: "椒江区", lnglat: "121.48, 28.68" },
  { name: "黄岩区", lnglat: "121.27, 28.65" },
  { name: "路桥区", lnglat: "121.45, 28.55" },
  { name: "玉环市", lnglat: "121.23, 28.13" },
  { name: "三门县", lnglat: "121.48, 29.07" },
  { name: "天台县", lnglat: "121.03, 29.13" },
  { name: "仙居县", lnglat: "120.73, 28.87" },
  { name: "温岭市", lnglat: " 121.37, 28.37" },
  { name: "临海市", lnglat: "121.12, 28.85" },
  { name: "莲都区", lnglat: "119.92, 28.45" },
  { name: "青田县", lnglat: "120.28, 28.15" },
  { name: "缙云县", lnglat: "120.13, 28.65" },
  { name: "遂昌县", lnglat: "119.27, 28.6" },
  { name: "松阳县", lnglat: "119.48, 28.45" },
  { name: "云和县", lnglat: "119.57, 28.12" },
  { name: "庆元县", lnglat: "119.09, 27.62" },
  { name: "景宁畲族自治县", lnglat: "119.63, 27.98" },
  { name: "龙泉市", lnglat: "119.13, 28.08" },
]
export {
  areaPos
}

export function getMapJsonByName(name) {
  const targetItem = cityNameMaptoJson.find(item => item.label === name)
  if (targetItem) {
    return targetItem.mapJson
  }
}

